home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / MAKESTR.422 < prev    next >
Text File  |  1993-02-23  |  6KB  |  162 lines

  1. Make Additional .STR files <WWIV v4.22> . . .
  2. Dr. Dre #1 @1 7-=1Top Administrator7=-0
  3. Mon Feb 22 07:01:42 1993
  4. FILE NAME          : MODSTRIN.MOD
  5. WRITTEN FOR VERSION: WWIV 4.22
  6. WRITTEN BY         : Tolkien 1@3456 (WWIVnet)
  7.                      Snorkel 1@3459 (WWIVnet)
  8. DATE WRITTEN       : 12-18-92
  9. FILES AFFECTED     : VARDEC.H
  10.                      STRINGS.C
  11.                      BBSUTL.C
  12. FUNCTION           : This mod will allow you to create an external string data
  13.                      file which will contain all the external strings for any
  14.                      modification you add to your source code.
  15. REQUIRED
  16. COMPANION FILE     : ESM204.ZIP (Registration of this program is essential so 
  17.                                  you can create and add external strings to 
  18.                                  the modification string data file.)
  19.  
  20.  
  21. In this version of WWIV (4.22), Wayne Bell has externalized all the strings.  
  22. This gives you the ability to customize the look of your BBS by editing the 
  23. strings.
  24.  
  25. However, since WWIV continues to evolve, it is very likely that Wayne will 
  26. release upgraded versions with additional strings added.  For this reason, it 
  27. is unwise to add strings to Wayne's existing string files.  What we have 
  28. chosen to do is to create an additional string file which will contain any 
  29. strings which you extract from any mods you place in your code.  For this 
  30. reason, it was necessary to increase the maximum number of available string 
  31. files by 1 so that in case Wayne wants to use the ones he originally coded for 
  32. 4.22, they can still be used by later versions.
  33.  
  34. In order to edit/create the necessary additional data file, you will need a 
  35. program which can do this.  To date, the only program that we are aware of is 
  36. ESM204.ZIP (External Strings Manager v2.04, written by Tolkien 1@3456)  To 
  37. have the necessary function to add strings to the data file(s), it is 
  38. necessary that you obtain a registered copy of ESM204 from Tolkien.  
  39. Registration enables the function that can ADD strings to existing data files.
  40. A copy of ESM204.ZIP (unregistered) can be obtained at Amber, most SDS sites, 
  41. and on Tolkien's BBS.  For details on how to register ESM204, read the 
  42. documentation accompanying the unregistered version of ESM204.
  43.  
  44. Wayne has coded the string files he uses as follows:
  45.  
  46.     0 - Default strings for the BBS (what prints to the screen)
  47.     1 - Sysop log string (what is written to the sysop log)
  48.     2 - File containing random "Yes" strings
  49.     3   File containing random "No" strings
  50.     4 - Currently unused
  51.     5 - Currently unused
  52.     6 - Currently unused
  53.     7 - MODIFICATION STRING FILE (for strings in mods)
  54.  
  55. Ordinarily, when searching for a string in any of the string data files, 
  56. except ENGLISH.STR, you would need to use the function 
  57.  
  58.                              get_stringx(n,xxx)
  59.  
  60. where "n" is the number associated with the data file (from the list above) 
  61. from which you wish the string to be read, and where "xxx" is the actual 
  62. string number, starting at 1 and going up as high as you want it.
  63.  
  64. However, with THIS function, the call to get the wanted modification string is 
  65. quite easy.  Simply use the line
  66.  
  67.                                 modstring(xxx)
  68.  
  69. where ever you want to read a string out of the modification string file.
  70.  
  71. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  72. STEP 1
  73.  
  74. Create a file called MODSTR.H, block copy the lines indicated below into it,
  75. and place it in the same directory as the rest of your source code.  4Be sure
  76. 4to save this new file along with your modified source files!!!!!!
  77.  
  78.  
  79. /************************** BEGINNING OF MODSTR.H ***************************/
  80.  
  81. #define MAX_STRFILES 8   /* this is 1 more string file than Wayne allocated */
  82. #define modstring(i)  (get_stringx(MAX_STRFILES,(unsigned short)(i)))
  83.  
  84. /**************************** END OF MODSTR.H *******************************/
  85.  
  86.  
  87. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  88. STEP 2
  89.  
  90. In VARDEC.H, add the line indicated
  91.  
  92.  
  93. #ifndef _VARDEC_H_
  94. #define _VARDEC_H_                    /* search for */
  95.  
  96. #include "modstr.h"                /* 2ADD this line0 */
  97.  
  98. /* DATA FOR EVERY USER */
  99. typedef struct {
  100.  
  101. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  102. STEP 3
  103.  
  104. In STRINGS.C, make the following changes indicated
  105.  
  106.  
  107. #include <sys\stat.h>              /* search for */
  108. #include <mem.h>
  109. #include <stdlib.h>
  110. #include "modstr.h"           /* 2ADD this line0 */
  111.  
  112. #define CACHE_LEN 4096
  113. #define WRITE_SUPPORT
  114. /* #define MAX_STRFILES 7    /* 2COMMENT OUT or REMOVE this line0 */  */
  115.  
  116. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  117. STEP 4
  118.  
  119. In BBSUTL.C, add the following line where indicated
  120.  
  121.  
  122.   set_strings_fn(2, languagedir, "YES.STR", 0);
  123.   set_strings_fn(3, languagedir, "NO.STR", 0);          /* search for */
  124.   set_strings_fn(MAX_STRFILES, syscfg.gfilesdir, "MOD.STR", 0); /* 2ADD0 */
  125.  
  126. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  127. STEP 5
  128.  
  129. Now create a string data file in your WWIV GFILES directory called
  130.  
  131. 1MOD.STR
  132.  
  133. This file will contain any additional strings which you create when you add 
  134. modifications to your source code which are not in ENGLISH.STR.
  135.  
  136. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  137. STEP 6
  138.  
  139. Now when you write a mod, and use a string from your MOD.STR file, you simply 
  140. call that string like the following example:
  141.  
  142. pl(modstring(258));
  143.     or
  144. npr("%s",modstring(125));
  145.     or
  146. outstr(modstring(24));
  147.  
  148. and so on, where the number in parentheses is the number of the string you 
  149. want printed to the screen or sysop log (depending on what you want do with 
  150. the string).
  151.  
  152. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  153. STEP 7
  154.  
  155. Recompile the ENTIRE source code.  This is necessary since you are making 
  156. additions to VARDEC.H.
  157.  
  158. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  159.  
  160. If you have any questions about this mod, contact Tolkien 1@3456 (WWIVnet) or
  161. Snorkel 1@3459 (WWIVnet).
  162.